﻿<%@ Page Language="C#" EnableEventValidation="false" Inherits="WebSys.UI.ZhengShou.BCSSManage.hetongHBprint"%>

<%--<%@ Register Assembly="WebSys.UI" Namespace="WebSys.UI.Control.ZhengShou" TagPrefix="CBW" %>
<%@ Register Assembly="Antu.WebControls" Namespace="Antu.WebControls" TagPrefix="CBW" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<CBW:MPRegion ID="HeaderRegion" runat="server" ><CBW:MPHeader ID="MPHeader1" runat="server"  ><CBW:MPRegion ID="BasicHeaderRegion" runat="server">
<link rel="stylesheet" type="text/css" href="<%= Antu.Core.Components.SiteSettings.DefaultSiteSettings.DefaultThemeFolderMapPath %>Styles/basic.css" />
<base target="_self" /> 
<object id="DLPrinter" classid="CLSID:5C230622-45E5-4e3c-893C-3BFDDC4DB5E4" codebase="<%= Antu.Core.Components.SiteSettings.DefaultSiteSettings.DefaultThemeFolderMapPath %>print/DLPrinter.cab" height="0" width="0">
</object>
<script type="text/javascript" src="<%= Antu.Core.Components.SiteSettings.DefaultSiteSettings.DefaultThemeFolderMapPath %>print/PrintWithThirdControl.js"></script>
</CBW:MPRegion>
<CBW:MPRegion ID="ExtendHeaderRegion" runat="server" /></CBW:MPHeader></CBW:MPRegion><body>
<CBW:MPForm runat="server" ID="aspnetForm">
<CBW:MPContent id="MPContent1" runat="server">
        <CBW:hetongHBprintControl ID="hetongHBprintControl" runat="server" SkinExtName="BCSSManage/" />
    </CBW:MPContent>
<CBW:MPRegion ID="ToperRegion" runat="server" />
<CBW:MPRegion ID="MPRegion1" runat="server" />
<CBW:MPRegion ID="FooterRegion" runat="server" />
</CBW:MPForm>
</body>
</html>--%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <base target="_self">
    <title>货币补偿协议合同打印</title>
    <link href="../../Themes/Default/Styles/basic.css" rel="stylesheet" type="text/css" />
    <object id="DLPrinter" classid="CLSID:5C230622-45E5-4e3c-893C-3BFDDC4DB5E4" codebase="../../Themes/Default/Script/DLPrinter.cab"
        height="0" width="0">
    </object>
    <script src="../../Themes/Default/Script/PrintWithThirdControl.js" type="text/javascript"></script>

    <script language="JavaScript" type="text/javascript">　　
   //name的值可为header（页眉），footer（页脚），margin_bottom（下边距），margin_left（左边距），margin_right（右边距），margin_top（上边距）。  　 　　    
var HKEY_Path="HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\PageSetup\\";　 　　    
function PageSetup(name,value){  
try{ var Wsh=new ActiveXObject("WScript.Shell");  
Wsh.RegWrite(HKEY_Path+name,value);}
catch(e){ alert('需要运行Activex才能进行打印设置。'); }}　  
    </script>

    <script>　　　 　　    
PageSetup('header','');   
PageSetup('footer',''); 　　 
var num=0.5   
PageSetup('margin_left',num);   
PageSetup('margin_top',num); 
PageSetup('margin_right',num);  
PageSetup('margin_bottom',num);    
    </script>

</head>
<body>
    <form runat="server" id="form1">
    <table class="jgtab" border="0" cellpadding="0" cellspacing="0" align="center" width="98%"
        style="margin-top: 1px">
        <tr>
            <th>
                货币补偿协议合同打印
            </th>
        </tr>
        <tr>
            <td style="text-align: right; color:Red; font-size:12px;">
            您正在进行第<asp:Label ID="dycs" runat="server" Text=""></asp:Label>次打印&nbsp;&nbsp;&nbsp;
            </td>
        </tr>
        <tr>
            <th style="text-align: left">
                方式一：批量打印
            </th>
        </tr>
        <tr>
            <td style="text-align: left; height: 30px">

                <script>
            function DoPrintView(url)
            {   
                    url=window.location.protocol+"//"+window.location.host+"//"+url;
                    DLPrinter.IsLandScape=2;
                    DLPrinter.ContentURL=url; 
                    DLPrinter.PrintPreview();
            }
           var i=0;
            function DoPrintj()
            {
                var tempurl=document.getElementById('<%=showtempurl.ClientID %>').value;              
                var tempurlarr=tempurl.split(';');    
                if(i<tempurlarr.length) 
                {
                    if(i==0)
                    {
                    var url=window.location.protocol+"//"+window.location.host+"//"+tempurlarr[i];    
                            DLPrinter.IsLandScape=2;  
                            DLPrinter.ContentURL=url; 
                            DLPrinter.PrintDirect(); 
                            i++;
                            //prompt(url,url);
                            DoPrintj();
                           
                    }else {
                           setTimeout(
                           function(){   
                            var url=window.location.protocol+"//"+window.location.host+"//"+tempurlarr[i];    
                            DLPrinter.IsLandScape=2;  
                            DLPrinter.ContentURL=url; 
                            DLPrinter.PrintDirect();
                            //prompt(url,url); 
                            i++;
                            DoPrintj();
                           },10000);
                       }
                    }else 
                    {i=0;}                                             
            }             
            
            var oi=0;       
            function DoPrinto()
            {
               var tempurl=document.getElementById('<%=showtempurlo.ClientID %>').value;              
                var tempurlarr=tempurl.split(';');                
                if(oi<tempurlarr.length) 
                {
                  if(oi==0)
                    {
                         var url=window.location.protocol+"//"+window.location.host+"//"+tempurlarr[tempurlarr.length-1-oi];   
                        DLPrinter.IsLandScape=2;  
                        DLPrinter.ContentURL=url; 
                        DLPrinter.PrintDirect(); 
                        oi++;
                        //prompt(url,url);
                        DoPrinto();
                           
                    }else {                
                       setTimeout(
                       function(){                  
                        var url=window.location.protocol+"//"+window.location.host+"//"+tempurlarr[tempurlarr.length-1-oi];      
                        DLPrinter.IsLandScape=2;
                        DLPrinter.ContentURL=url; 
                        DLPrinter.PrintDirect(); 
                        oi++;
                        DoPrinto();
                       },10000);
                   }
                    }else 
                    {oi=0;}   
                       
            }
                </script>
                <input type="button" style="border: 1px solid #ccc; background-color: #D2E2F5;" value="奇数页直接打印"
                    onclick='if(confirm("点击确认将直接批量打印奇数页(1,3,5,7,9,11,13!")){DoPrintj()}'  style="background-image: url('style/an1.gif'); width:80px; height:24px" >
                <input type="button" style="border: 1px solid #ccc; background-color: #D2E2F5;" value="偶数页直接打印"
                    onclick='if(confirm("点击确认将直接批量打印偶数页(2,4,6,8,10,12,14!")){DoPrinto()}'  style="background-image: url('style/an1.gif'); width:80px; height:24px" >
            </td>
        </tr>
        <tr>
            <td>
            </td>
        </tr>
    </table>
    <asp:TextBox ID="showtempurl" runat="server" Style="display: none"></asp:TextBox>
    <asp:TextBox ID="showtempurlo" runat="server" Style="display: none"></asp:TextBox>
    <table align="center" border="0" cellpadding="0" cellspacing="0" class="window_tab_list" style="margin-top: 1px"
        width="98%">
        <tr>
            <th style="text-align: left" colspan="2">
                方式二：单个打印
            </th>
        </tr>
        <tr>
            <td style="text-align: left">
                <span onclick='DoPrintView("<%=WebSys.UI.ZhengShou.BCSSManage.hetongHBprint.Bind("房屋征收货币补偿协议01") %>")' style="cursor: pointer">
                   房屋征收货币补偿协议01</span>
            </td>
            <td style="text-align: left">
                <span onclick='DoPrintView("<%=WebSys.UI.ZhengShou.BCSSManage.hetongHBprint.Bind("房屋征收货币补偿协议02") %>")' style="cursor: pointer">
                    房屋征收货币补偿协议02</span>
            </td>
        </tr>
        <tr>
            <td style="text-align: left">
                <span onclick='DoPrintView("<%=WebSys.UI.ZhengShou.BCSSManage.hetongHBprint.Bind("房屋征收货币补偿协议03") %>")' style="cursor: pointer">
                    房屋征收货币补偿协议03</span>
            </td>
            <td style="text-align: left">
                <span onclick='DoPrintView("<%=WebSys.UI.ZhengShou.BCSSManage.hetongHBprint.Bind("房屋征收货币补偿协议04") %>")' style="cursor: pointer">
                    房屋征收货币补偿协议04</span>
            </td>
        </tr>
        <tr>
            <td style="text-align: left">
                <span onclick='DoPrintView("<%=WebSys.UI.ZhengShou.BCSSManage.hetongHBprint.Bind("房屋征收货币补偿协议05") %>")' style="cursor: pointer">
                    房屋征收货币补偿协议05</span>
            </td>
            <td style="text-align: left">
                <span onclick='DoPrintView("<%=WebSys.UI.ZhengShou.BCSSManage.hetongHBprint.Bind("房屋征收货币补偿协议06") %>")' style="cursor: pointer">
                    房屋征收货币补偿协议06</span>
            </td>
        </tr>
         <tr>
            <td style="text-align: left">
                <span onclick='DoPrintView("<%=WebSys.UI.ZhengShou.BCSSManage.hetongHBprint.Bind("房屋征收货币补偿协议07") %>")' style="cursor: pointer">
                   房屋征收货币补偿协议07</span>
            </td>
            <td style="text-align: left">
                <span onclick='DoPrintView("<%=WebSys.UI.ZhengShou.BCSSManage.hetongHBprint.Bind("房屋征收货币补偿协议08") %>")' style="cursor: pointer">
                    房屋征收货币补偿协议08</span>
            </td>
        </tr>
        <tr>
            <td style="text-align: left">
                <span onclick='DoPrintView("<%=WebSys.UI.ZhengShou.BCSSManage.hetongHBprint.Bind("房屋征收货币补偿协议09") %>")' style="cursor: pointer">
                    房屋征收货币补偿协议09</span>
            </td>
            <td style="text-align: left">
                <span onclick='DoPrintView("<%=WebSys.UI.ZhengShou.BCSSManage.hetongHBprint.Bind("房屋征收货币补偿协议10") %>")' style="cursor: pointer">
                    房屋征收货币补偿协议10</span>
            </td>
        </tr>
        <tr>
            <td style="text-align: left">
                <span onclick='DoPrintView("<%=WebSys.UI.ZhengShou.BCSSManage.hetongHBprint.Bind("房屋征收货币补偿协议11") %>")' style="cursor: pointer">
                    房屋征收货币补偿协议11</span>
            </td>
            <td style="text-align: left">
                <span onclick='DoPrintView("<%=WebSys.UI.ZhengShou.BCSSManage.hetongHBprint.Bind("房屋征收货币补偿协议12") %>")' style="cursor: pointer">
                    房屋征收货币补偿协议12</span>
            </td>
        </tr>
         <tr>
            <td style="text-align: left">
                <span onclick='DoPrintView("<%=WebSys.UI.ZhengShou.BCSSManage.hetongHBprint.Bind("房屋征收货币补偿协议13") %>")' style="cursor: pointer">
                    房屋征收货币补偿协议13</span>
            </td>
            <td style="text-align: left">
                
            </td>
        </tr>
        
    </table>

    <%-- <input type="button" value="打印" onclick='javascript:wb.ExecWB(6,1)' />
        <input type="button" value="打印预览" onclick='javascript:wb.ExecWB(7,1)' />
        <input type="button" value="页面设置" onclick='javascript:wb.ExecWB(8,1)' />--%>
    </form>
</body>
</html>